<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:t="http://myfaces.apache.org/tomahawk">
<f:view>
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="shortcut icon" href="favicon.png" type="image/png"/>
	<title>#{title}</title>
	<style type="text/css">
		@import url("#{config.server}/css/client.css");
    </style>
</h:head>
<h:body style="margin:0; padding:0">
	<f:loadBundle basename="configurations" var="config"></f:loadBundle>
	<script src="#{config.server}/js/client.js" type="text/javascript"></script>
	<script src="#{config.server}/js/jquery-1.5.1.min.js" type="text/javascript"></script>
	<script src="#{config.server}/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
	<script src="#{config.server}/js/jquery.scrollTo.js" type="text/javascript"></script>
	<div id="top"></div>
	<div style="width:1024px;margin: auto;" align="center">
		<div style="width:100%; height: 237px; background-image: url('#{config.server}/img/client/top.jpg');">
			<span style="font-size:26pt; font-weight:bold;color: white;text-shadow: -1px 1px 2px gray;position:relative; top:80px;">
				HOA CỎ MAY
			</span>
		</div>
		<table cellpadding="5" cellspacing="0" style="width:100%;" width="100%">
			<tr>
				<td colspan="2" class="menu-bar">
					<!-- MENU BAR -->
					<h:form>
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td>
									<h:commandButton value="Trang chủ" action="#{homePageBean.init}" styleClass="menu-bar-button"/>
								</td>
								<c:forEach var="aCate" items="#{mstBean.allCategories}">
									<td>
										<h:commandButton value="#{aCate.name}" action="#{showCategoryBean.init}" styleClass="menu-bar-button">
											<f:setPropertyActionListener value="#{aCate.code}" target="#{showCategoryBean.categoryCode}"/>
										</h:commandButton>
									</td>
								</c:forEach>
								<td>
									<h:commandButton value="Hướng dẫn thanh toán" action="#{staticPagesBean.initPaymentGuide}" styleClass="menu-bar-button"/>
								</td>
								<td>
									<h:commandButton value="Liên hệ" action="#{staticPagesBean.initContact}" styleClass="menu-bar-button"/>
								</td>
							</tr>
						</table>
					</h:form>
				</td>
			</tr>
			<tr>
				<td style="vertical-align: top; width: 230px" width="230px">
					<div>
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td class="box" style="padding: 5px">
									<!-- SEARCH -->
									<h:form>
										<h:panelGrid columns="2">
											<h:outputText value="Mã"/>
											<h:inputText value="#{searchBean.name}" styleClass="input" style="width:125px"/>
											
											<h:outputText value="Loại" />
											<h:selectOneListbox value="#{searchBean.categoryCode}" size="1" styleClass="input" style="width:125px">
												<f:selectItem itemLabel="-" itemValue=""/>
												<c:forEach var="aCate" items="#{mstBean.allCategories}">
													<f:selectItem itemLabel="#{aCate.name}" itemValue="#{aCate.code}"/>
												</c:forEach>
											</h:selectOneListbox>
											
											<h:outputText value="Giá từ"/>
											<h:selectOneListbox value="#{searchBean.priceFrom}" size="1" styleClass="input" style="width:125px">
												<f:selectItem itemLabel="-" itemValue="-1"/>
												<f:selectItem itemLabel="100.000" itemValue="100"/>
												<f:selectItem itemLabel="200.000" itemValue="200"/>
												<f:selectItem itemLabel="300.000" itemValue="300"/>
												<f:selectItem itemLabel="400.000" itemValue="400"/>
												<f:selectItem itemLabel="500.000" itemValue="500"/>
												<f:selectItem itemLabel="600.000" itemValue="600"/>
												<f:selectItem itemLabel="700.000" itemValue="700"/>
												<f:selectItem itemLabel="800.000" itemValue="800"/>
												<f:selectItem itemLabel="900.000" itemValue="900"/>
											</h:selectOneListbox>
											
											<h:outputText value="Giá đến"/>
											<h:selectOneListbox value="#{searchBean.priceTo}" size="1" styleClass="input" style="width:125px">
												<f:selectItem itemLabel="-" itemValue="-1"/>
												<f:selectItem itemLabel="100.000" itemValue="100"/>
												<f:selectItem itemLabel="200.000" itemValue="200"/>
												<f:selectItem itemLabel="300.000" itemValue="300"/>
												<f:selectItem itemLabel="400.000" itemValue="400"/>
												<f:selectItem itemLabel="500.000" itemValue="500"/>
												<f:selectItem itemLabel="600.000" itemValue="600"/>
												<f:selectItem itemLabel="700.000" itemValue="700"/>
												<f:selectItem itemLabel="800.000" itemValue="800"/>
												<f:selectItem itemLabel="900.000" itemValue="900"/>
											</h:selectOneListbox>
										</h:panelGrid>
										<div style="width: 100%;margin-top: 5px" align="center">
											<h:commandButton value="Tìm kiếm" action="#{searchBean.search}" styleClass="button"/>
										</div>
									</h:form>
								</td>
							</tr>
							<tr style="height: 5px"></tr>
							<tr>
								<td class="box" style="padding: 5px">
									<!-- CART -->
									<h:form id="cartForm">
										<t:div id="content">
											<h3>Giỏ hàng</h3>
											#{cartBean.totalQuantity} sản phẩm
											<br></br>
											#{cartBean.totalMoney}.000 đồng
											<br></br>
											<h:panelGrid columns="2">
												<h:commandButton value="Xem giỏ hàng" action="#{cartBean.view}" styleClass="button"/>
												<h:commandButton value="Đặt hàng" action="#{cartBean.order}" styleClass="button"/>
											</h:panelGrid>
										</t:div>
									</h:form>
								</td>
							</tr>
							<tr style="height: 5px"></tr>
							<tr>
								<td class="box" style="padding: 5px;" align="center">
									<h3>Tư vấn online</h3>
									<br></br>
									<a href="ymsgr:sendIM?saolaithe81205">
										<img border="0" src="http://mail.opi.yahoo.com/online?u=saolaithe81205&amp;m=g&amp;t=2"/>
									</a>
									<br></br>
									<a href="ymsgr:sendIM?hoacomay_370ntt">
										<img border="0" src="http://mail.opi.yahoo.com/online?u=hoacomay_370ntt&amp;m=g&amp;t=2"/>
									</a>
									
								</td>
							</tr>
							<tr>
								<td>
									<a href="http://www.cheesegroup.com/">
										<img src="#{config.server}/img/client/Cheese-Group-Logo.png" alt="http://www.cheesegroup.com/"
											width="230px" border="0"/>
									</a>
								</td>
							</tr>
						</table>
					</div>
				</td>
				<td class="box">
					<ui:insert name="body"/>
				</td>
			</tr>
		</table>
		<div style="width: 100%;text-align: center;">
			© Copyright by Hoa Cỏ May 2011.
		</div>
	</div>
	<script>
		var message = '#{messageBean.message}';
		if(message != '') {
			alert(message);
		}
	</script>
	<div class="productImageRealSizeBkgr" style="display: none;">
		<table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
			<tr>
				<td style="vertical-align: middle;" align="center">
					<img src="" class="realSizeImg"/>
					<br></br>
					<button onclick="$('.productImageRealSizeBkgr').hide()">Đóng</button>
				</td>
			</tr>
		</table>
	</div>
</h:body>
</f:view>
</html>